package com.heima.admin.service.impl;
/*
    
 需求描述：
 @Author: wang
 @Date: 2022/10/21 17:55
 
 */

import com.heima.admin.service.SensitiveWordService;
import com.heima.apis.wemedia.ISensitiveClient;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.dtos.WmSensitiveDto;
import com.heima.model.wemedia.dtos.WmSensitivePageReqDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class SensitiveWordServiceImpl implements SensitiveWordService {


    @Autowired
    private ISensitiveClient sensitiveClient;
    /**
     * 保存敏感词
     *
     * @param dto
     * @return
     */
    @Override
    public ResponseResult saveSensitive(WmSensitiveDto dto) {
        return sensitiveClient.save(dto);
    }

    /**
     * 获取敏感词列表
     *
     * @return
     * @param dto
     */
    @Override
    public ResponseResult listSensitive(WmSensitivePageReqDto dto) {

        return sensitiveClient.listSensitive(dto);
    }

    /**
     * 修改敏感词
     *
     * @param dto
     * @return
     */
    @Override
    public ResponseResult updateSensitive(WmSensitiveDto dto) {
        return sensitiveClient.updateSensitive(dto);
    }

    /**
     * 删除敏感词
     *
     * @param id
     * @return
     */
    @Override
    public ResponseResult deleteSensitive(Integer id) {

        return sensitiveClient.deleteSensitive(id);
    }
}
